<table>
	<tr>
		<td>
			<a class="button" href="<?php echo $this->baseUrl() ?>/cpproducts/add">
				<div style="background:url(<?php echo $this->baseUrl() ?>/public/images/plus_16.png);" class="inb">Dodaj <?php echo $this->yih2 ?></div>
			</a>
		</td>
	</tr>
</table>

<div class="bglist">
	<div class="bglistq">
		<table cellspacing="1" cellpadding="6" class="tlist">
			<tr>
				<th>Id</th>
				<th>Nazwa</th>
				<th>Akcje</th>
			</tr>
			<?php foreach( $this->list as $item ) { ?>
			<tr>
				<td><?php echo $item['p_id'] ?></td>
				<td><?php echo $item['title'] ?></td>
				<td>
					<a href="<?php echo $this->baseUrl() ?>/cpproducts/addphotos/id/<?php echo $item['p_id'] ?>" class="gear">Zdjęcia</a>
					<a href="<?php echo $this->baseUrl() ?>/cpproducts/add/id/<?php echo $item['p_id'] ?>" class="edit">Edytuj</a>
					<?php 
					foreach ($this->langs as $one)
					{
						?>
						<a href="<?php echo $this->baseUrl() ?>/cpproducts/add/id/<?php echo $item['p_id'] ?>/ln/<?php echo $one['l_id']?>" class="edit">Edytuj <?php echo $one['name_short']?></a>
						<?php 			 
					}
					?>
					<a onclick="return confirmDelete();" href="<?php echo $this->baseUrl() ?>/cpproducts/delete/id/<?php echo $item['p_id'] ?>" class="delete">Usuń</a>
					<a href="<?php echo $this->baseUrl() ?>/cpproducts/changeorder/id/<?php echo $item['p_id'] ?>/where/0" class="down">Przesuń w dół</a>
					<a href="<?php echo $this->baseUrl() ?>/cpproducts/changeorder/id/<?php echo $item['p_id'] ?>/where/1" class="up">Przesuń w górę</a>
					<a href="<?php echo $this->baseUrl() ?>/cpproducts/changeorder/id/<?php echo $item['p_id'] ?>/where/2" class="down">Ustaw jako ostatni</a>
					<a href="<?php echo $this->baseUrl() ?>/cpproducts/changeorder/id/<?php echo $item['p_id'] ?>/where/3" class="up">Ustaw jako pierwszy</a>
				</td>
			</tr>
			<?php } ?>
		</table>
	</div>
</div>
<?php  echo $this->render('global/pager.phtml'); ?>